//
//  JPhotoItem.h
//  JPhotoBrowser_Example
//
//  Created by 计海峰 on 2017/11/16.
//  Copyright © 2017年 jhfappkf@163.com. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface JPhotoItem : NSObject

//sourceView
@property (nonatomic, strong, readonly) UIView *sourceView;

//缩略图
@property (nonatomic, strong, readonly) UIImage *thumbImage;
//本地图片
@property (nonatomic, strong, readonly) UIImage *image;
//网络地址 预览图
@property (nonatomic, strong, readonly) NSURL *imageUrl;

//图片是否加载完成
@property (nonatomic, assign) BOOL finished;

//是不是视频
@property (nonatomic, assign, readonly) BOOL isVideo;
//视频标题
@property (nonatomic, copy) NSString *videoTitle;
//视频网络地址
@property (nonatomic, strong, readonly) NSURL *videoUrl;
//视频本地地址
@property (nonatomic, strong, readonly) NSURL *videoLocalUrl;

- (instancetype)initWithSourceView:(UIView *)view
                        thumbImageUrl:(NSURL *)imageUrl
                          videoUrl:(NSURL *)url;

- (instancetype)initWithSourceView:(UIView *)view
                        thumbImage:(UIImage *)image
                          videoUrl:(NSURL *)url;

- (instancetype)initWithSourceView:(UIView *)view
                        thumbImage:(UIImage *)image
                          imageUrl:(NSURL *)url;
- (instancetype)initWithSourceView:(UIImageView *)view
                          imageUrl:(NSURL *)url;
- (instancetype)initWithSourceView:(UIImageView *)view
                             image:(UIImage *)image;

+ (instancetype)itemWithSourceView:(UIView *)view
                         thumbImage:(UIImage *)image
                           imageUrl:(NSURL *)url;
+ (instancetype)itemWithSourceView:(UIImageView *)view
                           imageUrl:(NSURL *)url;
+ (instancetype)itemWithSourceView:(UIImageView *)view
                              image:(UIImage *)image;

@end

NS_ASSUME_NONNULL_END
